package com.jackeysun.widget.media

import android.content.Context
import android.media.AudioManager

/**
 *   Created by sunxunchao on 2021/12/29.
 */
interface IPlayer {

    fun reset()

    fun setSource(path: String)

    fun start()

    fun pause()

    fun stop()

    fun release()

    fun seekTo(msec: Int)

    fun setSpeed(speed: Float): Float

    fun setVolume(leftVolume: Float, rightVolume: Float)

    fun getDuration(): Int

    fun getCurrentPosition(): Int

    fun isPlaying(): Boolean

    fun requestAudioFocusSuccess(audioManager: AudioManager,durationHint: Int): Boolean

    fun abandonAudioFocusSuccess(audioManager: AudioManager): Boolean

}